package com.muyu.cloud.commodity.mapper;

import com.muyu.cloud.commodity.domain.model.SpecGroupListModel;
import com.muyu.cloud.commodity.domain.req.SpecGroupListReq;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * @
 * @descriptions: SpecGroupMapper
 * @author: LiuSuo
 * @date: 21:02
 * @version: 1.0
 */
@Mapper
public interface SpecGroupMapper {

    long countByQuery(SpecGroupListReq req);

    List<SpecGroupListModel> selectPageByQuery(SpecGroupListReq req);

    int insertGroupReturnId(com.muyu.cloud.commodity.domain.model.SpecGroup group);
    
    int updateById(com.muyu.cloud.commodity.domain.model.SpecGroup group);

    /**
     * 根据商品ID查询规格组
     */
    List<com.muyu.cloud.commodity.domain.model.SpecGroup> selectByProductId(Long productId);
}
